from sqlalchemy import Column, String

from db import Base


class ProvinceModel(Base):
    """省模型"""
    __tablename__ = 'province'

    code = Column(String(255), primary_key=True)
    name = Column(String(255))


class CityModel(Base):
    """市模型"""
    __tablename__ = 'city'

    code = Column(String(255), primary_key=True)
    name = Column(String(255))
    province_code = Column(String(255))


class AreaModel(Base):
    """县模型"""
    __tablename__ = 'area'

    code = Column(String(255), primary_key=True)
    name = Column(String(255))
    province_code = Column(String(255))
    city_code = Column(String(255))


class StreetModel(Base):
    """乡镇模型"""
    __tablename__ = 'street'

    code = Column(String(255), primary_key=True)
    name = Column(String(255))
    province_code = Column(String(255))
    city_code = Column(String(255))
    area_code = Column(String(255))


class VillageModel(Base):
    """街道村委会模型"""
    __tablename__ = 'village'

    code = Column(String(255), primary_key=True)
    name = Column(String(255))
    province_code = Column(String(255))
    city_code = Column(String(255))
    area_code = Column(String(255))
    street_code = Column(String(255))
